package cn.edu.sdjzu.xg.bysj.domain;

import lombok.Getter;
import lombok.Setter;


import java.io.Serializable;

@Getter
@Setter
//课题方向类
public final class OpenArea implements
        Comparable<OpenArea>, Serializable {
    private Integer id;
    //方向
    private String area;
    //类别
    private GraduateProjectCategory graduateProjectCategory;
    private Teacher teacher;
    //对学生的要求
    private String requirement;
    //需要的学生数
    private int positionNum;
    //年份
    private int year;

    public OpenArea(Integer id, String area, GraduateProjectCategory graduateProjectCategory,
                    Teacher teacher, String requirement, int positionNum, int year) {
        this.id = id;
        this.area = area;
        this.graduateProjectCategory = graduateProjectCategory;
        this.teacher = teacher;
        this.requirement = requirement;
        this.positionNum = positionNum;
        this.year = year;
    }

    public OpenArea(String area, GraduateProjectCategory graduateProjectCategory,
                    Teacher teacher, String requirement, int positionNum, int year) {
        this.area = area;
        this.graduateProjectCategory = graduateProjectCategory;
        this.teacher = teacher;
        this.requirement = requirement;
        this.positionNum = positionNum;
        this.year = year;
    }


    @Override
    public int compareTo(OpenArea openArea) {
        return this.id - openArea.id;
    }
}
